@model ShivamEMR.Model.Domain.PharmacyDomain.Dosage

@* This partial view defines form fields that will appear when creating and editing entities *@

<div class="editor-label">
    @Html.LabelFor(model => model.Quantity)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Quantity)
    @Html.ValidationMessageFor(model => model.Quantity)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Direction)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Direction)
    @Html.ValidationMessageFor(model => model.Direction)
</div>

<div class="editor-label">
    @Html.LabelFor(model => model.Notes)
</div>
<div class="editor-field">
    @Html.EditorFor(model => model.Notes)
    @Html.ValidationMessageFor(model => model.Notes)
</div>

<div class="editor-label">
    Unit
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.UnitID, ((IEnumerable<ShivamEMR.Model.Domain.CommonDomain.Unit>)ViewBag.PossibleUnits).Select(option => new SelectListItem {
        Text = (option == null ? "None" : option.Name), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.UnitID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.UnitID)
</div>
<div class="editor-label">
    PersonStage
</div>
<div class="editor-field">
    @Html.DropDownListFor(model => model.PersonStageID, ((IEnumerable<ShivamEMR.Model.Domain.PersonDomain.PersonStage>)ViewBag.PossiblePersonStages).Select(option => new SelectListItem {
        Text = Html.DisplayTextFor(_ => option).ToString(), 
        Value = option.ID.ToString(),
        Selected = (Model != null) && (option.ID == Model.PersonStageID)
    }), "Choose...")
    @Html.ValidationMessageFor(model => model.PersonStageID)
</div>
